package com.amigo.online.provider.user.service;

import com.alibaba.fastjson.JSONObject;
import com.amigo.online.common.param.dto.pay.CardPayDto;
import com.amigo.online.common.param.dto.pay.IosPayDto;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.validation.annotation.Validated;

/**
 * @author pangdonghao
 * @version 1.0
 * @csdn https://blog.csdn.net/pangdongh
 * @createDate 2019/10/22 15:03
 */
public interface PayService {
    JSONObject payWithCard(CardPayDto dto);

    @Transactional(isolation = Isolation.READ_COMMITTED,propagation = Propagation.REQUIRES_NEW)
    String payWithIOS(@Validated IosPayDto dto);
}
